package
{
	import flash.external.ExternalInterface;
	import flash.utils.getTimer;
	
	public function log(...rest):void
	{
		var ms:uint, s:uint, m:uint, h:uint;
		var string:String = (getTimer() / 1000).toString() + '|';
		for each(var item:* in rest)
		{
			if(item is String)
				string += item;
			else if(item == null)
				string += 'null';
			else if(item is XML || item is XMLList)
				string += item.toXMLString();
			else if(item.toString)
				string += item.toString();
			else
				string += '[Can\'t Serialize]';
			string += ' ';
		}
		try
		{
			ExternalInterface.call('console.log', string);
			trace(string);
		}
		catch(e:Error)
		{
			trace(string);
		}
	}
}